import { request } from '@boeyo/portal';

/**
 * 历史数据波形
 */
export const fetchHistoryData = (params) => {
  return request({
    url: 'deviceData/history',
    params,
  });
};

/**
 * 历史数据下载 mseed
 */
export const downloadHistoryData = (params) => {
  return request({
    url: 'deviceData/historyDown',
    responseType: 'blob',
    params,
  });
};

/**
 * 生成地震速报报告
 * null
 */
export const signal = (data) => {
  return request({
    url: `/deviceData/signal`,
    method: 'post',
    data,
  });
};
